# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=dovecot-fts-xapian
pkgver=1.5.7
pkgrel=0
pkgdesc="Dovecot xapian fts plugin"
url="https://github.com/grosjo/fts-xapian"
arch="all"
license="LGPL-2.1-or-later"
depends="dovecot xapian-core"
makedepends="autoconf automake chrpath dovecot-dev icu-dev libtool sqlite-dev xapian-core-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/grosjo/fts-xapian/archive/$pkgver.tar.gz"
builddir="$srcdir/"fts-xapian-$pkgver

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	PANDOC=false ./configure \
		--enable-static=no \
		--with-dovecot=/usr/lib/dovecot
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	chrpath -d "$pkgdir"/usr/lib/dovecot/lib21_fts_xapian_plugin.so
}

sha512sums="
eb3b7e19ba522dd9e9c2952c3022b15249889c814e8a90b50836526ab5000b26e0e835b71d3a4439f03d5399277b70a3ffeb366ca42061b647ab8ce251268c3b  dovecot-fts-xapian-1.5.7.tar.gz
"
